package ru.maksb.exchange.service;

import java.util.concurrent.BlockingQueue;

public class HeartbeatSender implements Runnable {
    private BlockingQueue<String> messagesToSend;

    public HeartbeatSender(BlockingQueue<String> messagesToSend) {
        this.messagesToSend = messagesToSend;
    }

    public void run() {
        try {
            messagesToSend.put(ResponseFactory.heartbeat());
        } catch (InterruptedException e) {
        }
    }

}
